package com.yungu.swift.monitor.model;

import lombok.Data;

import java.io.Serializable;

/**
 * @author : cuixiuyin
 * @date : 2019/10/12
 */
@Data
public class Application implements Serializable {


    /**
     * id : 64f38348
     * name : swift-admin
     * statusInfo : {"status":"UP","timestamp":1570852241074,"details":{"diskSpace":{"status":"UP","total":105554128896,"free":57209155584,"threshold":10485760},"redis":{"status":"UP","version":"3.2.12"},"status":"UP"}}
     */

    private String id;
    private String name;
    private StatusInfo statusInfo;


    @Data
    public static class StatusInfo implements Serializable {
        /**
         * status : UP
         * timestamp : 1570852241074
         * details : {"diskSpace":{"status":"UP","total":105554128896,"free":57209155584,"threshold":10485760},"redis":{"status":"UP","version":"3.2.12"},"status":"UP"}
         */

        private String status;
        private long timestamp;
        private Details details;

        @Data
        public static class Details {
            private DiskSpace diskSpace;

            @Data
            public static class DiskSpace {
                /**
                 * total : 105554128896
                 * free : 57209155584
                 */
                private long total;
                private long free;
            }
        }


    }
}
